<template>
    <div class="">
      <!-- select单选框 -->
      <el-select v-model='selectVal'>
        <el-option v-for='(item,index) in options'
          :key='item.id'
          :label='item.label'
          :value='item.value'
        >
        </el-option>
      </el-select>
      <!-- select多选框 multiple属性即可启用多选-->
      <el-select v-model='selectVals' multiple>
        <el-option v-for='(item,index) in options'
          :key='item.id'
          :label='item.label'
          :value='item.value'
        >
        </el-option>
      </el-select>
    </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  components: {
    HelloWorld
  },
  data:function(){
    return {
      selectVals:[],
      selectVal:'apple',
      options:[
        {
          value:'apple',
          label:'苹果'
        },
        {
          value:'orange',
          label:'橘子'
        },
        {
          value:'banana',
          label:'香蕉'
        },
      ]
    }
  },
  methods:{
    

  },
}
</script>

<style>
*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
</style>

<style lang='less' scoped>



</style>
